<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>13-求1-100之间所有能被3整除的数字的和</title>
	</head>
	<body>
		<script type="text/javascript">
			//声明一个变量sum去接收它的值
			var sum = 0;
			//从1开始循环
			for(var i=1;i<=100;i++){
				if(i%3==0){
					sum+=i;
				}
			}
			console.log(sum);//1683
		</script>
	</body>
</html>
